package org.microframework.cloud.logs.model.dto;

import java.util.List;
import java.util.Map;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 统计数据传输对象
 *
 * @author zs
 * @version 1.0.0
 * @since 2024-06-14
 */
@Data
@Schema(description = "统计数据传输对象")
public class StatisticsDTO {
    
    @Schema(description = "总数量")
    private Long totalCount;
    
    @Schema(description = "成功数量")
    private Long successCount;
    
    @Schema(description = "失败数量")
    private Long failureCount;
    
    @Schema(description = "每日统计数据")
    private List<DailyStats> dailyStats;
    
    @Schema(description = "分类统计数据")
    private Map<String, Long> categoryStats;
    
    @Schema(description = "趋势数据")
    private List<TrendData> trendData;
    
    @Data
    @Schema(description = "每日统计数据")
    public static class DailyStats {
        @Schema(description = "日期")
        private String date;
        
        @Schema(description = "数量")
        private Long count;
    }
    
    @Data
    @Schema(description = "趋势数据")
    public static class TrendData {
        @Schema(description = "时间点")
        private String timePoint;
        
        @Schema(description = "数量")
        private Long count;
    }
} 